POV-Ray : Newsgroups : povray.general : Need math help : Re: Need math help Server Time
10 Aug 2024 09:14:03 EDT (-0400)
  Re: Need math help  
From: John VanSickle
Date: 10 Mar 2000 21:29:40
Message: <38C9B210.6698DB45@erols.com>
David Fontaine wrote:
> 
> Poor little me, trying to carve out a name for myself in the wonderous
> field of macros, and everyone has to go and use VanSickle's...
> Well I see yours is nice and lengthy compared to mine ;-)

I avoided using the trig functions.  I also made local copies of the
arguments, so that if the user passes an expression as one of the arguments,
that expression will be evaluated.  For instance, this macro

  #macro MyMacro(A,B) (A-B) #end

can be invoked this way:

  #local J=MyMacro(77*2,45*2-23*3);

which POV-Ray will evalaute as:

  #local J=77*2-45*2-23*3;

which is almost certainly *not* what the user wanted.

Regards,
John


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.